<?php 
	class TestM extends CI_Model {



    function __construct()
    {
        parent::__construct();
    }
    
    public function funcionModelo()
    {
    	$cad="<h1>test query interno: </h1>";
		$this->load->database('local');
		$query = $this->db->query('SELECT nombre FROM usuario');
		foreach ($query->result() as $row)
		{
			$cad=$cad.$row->nombre."<br>";
		}
		$cad=$cad. 'Total Results: ' . $query->num_rows(); 
		$this->db->close();
		return $cad;
    }

}?>